-- @owner: cr13
-- @date: 2023-02-08
-- @testpoint: connect by在基表式cte的时候使用siblings

--step1:建表并插入数据 expect:成功
drop table if exists t_test_036;
create table t_test_036(c1 int,c2 int,c3 int);
insert into t_test_036 values(1,1,1);
insert into t_test_036 values(2,2,2);

--step2:执行connect by在基表式cte的时候使用siblings expect:成功
with cte1 as (select * from t_test_036) select *, connect_by_iscycle from cte1 start with c1=1 connect by nocycle prior c1=c2 order siblings by 1,2 nulls last;

--step3:清理环境 expect:成功
drop table if exists t_test_036;